package workbench.domain;

public class Activity {
    private String id;//主键
    private String owner;//所有者，外键，关联tbl—_user
    private String name;//市场活动的名称
    private String startDate;//开始日期 年月日
    private String endDate;//结束日期  年月日
    private String cost;//成本
    private String description;//描述
    private String createTime;//创建日期 年月日时分秒
    private String createBy;//创建人     年月日时分秒
    private String editTime;//修改时间
    private String editBy;//修改人

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Activity activity = (Activity) o;

        if (getId() != null ? !getId().equals(activity.getId()) : activity.getId() != null) return false;
        if (getOwner() != null ? !getOwner().equals(activity.getOwner()) : activity.getOwner() != null) return false;
        if (getName() != null ? !getName().equals(activity.getName()) : activity.getName() != null) return false;
        if (getStartDate() != null ? !getStartDate().equals(activity.getStartDate()) : activity.getStartDate() != null)
            return false;
        if (getEndDate() != null ? !getEndDate().equals(activity.getEndDate()) : activity.getEndDate() != null)
            return false;
        if (getCost() != null ? !getCost().equals(activity.getCost()) : activity.getCost() != null) return false;
        if (getDescription() != null ? !getDescription().equals(activity.getDescription()) : activity.getDescription() != null)
            return false;
        if (getCreateTime() != null ? !getCreateTime().equals(activity.getCreateTime()) : activity.getCreateTime() != null)
            return false;
        if (getCreateBy() != null ? !getCreateBy().equals(activity.getCreateBy()) : activity.getCreateBy() != null)
            return false;
        if (getEditTime() != null ? !getEditTime().equals(activity.getEditTime()) : activity.getEditTime() != null)
            return false;
        return getEditBy() != null ? getEditBy().equals(activity.getEditBy()) : activity.getEditBy() == null;
    }

    @Override
    public int hashCode() {
        int result = getId() != null ? getId().hashCode() : 0;
        result = 31 * result + (getOwner() != null ? getOwner().hashCode() : 0);
        result = 31 * result + (getName() != null ? getName().hashCode() : 0);
        result = 31 * result + (getStartDate() != null ? getStartDate().hashCode() : 0);
        result = 31 * result + (getEndDate() != null ? getEndDate().hashCode() : 0);
        result = 31 * result + (getCost() != null ? getCost().hashCode() : 0);
        result = 31 * result + (getDescription() != null ? getDescription().hashCode() : 0);
        result = 31 * result + (getCreateTime() != null ? getCreateTime().hashCode() : 0);
        result = 31 * result + (getCreateBy() != null ? getCreateBy().hashCode() : 0);
        result = 31 * result + (getEditTime() != null ? getEditTime().hashCode() : 0);
        result = 31 * result + (getEditBy() != null ? getEditBy().hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "Activity{" +
                "id='" + id + '\'' +
                ", owner='" + owner + '\'' +
                ", name='" + name + '\'' +
                ", startDate='" + startDate + '\'' +
                ", endDate='" + endDate + '\'' +
                ", cost='" + cost + '\'' +
                ", description='" + description + '\'' +
                ", createTime='" + createTime + '\'' +
                ", createBy='" + createBy + '\'' +
                ", editTime='" + editTime + '\'' +
                ", editBy='" + editBy + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getOwner() {
        return owner;
    }

    public void setOwner(String owner) {
        this.owner = owner;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public String getCost() {
        return cost;
    }

    public void setCost(String cost) {
        this.cost = cost;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getEditTime() {
        return editTime;
    }

    public void setEditTime(String editTime) {
        this.editTime = editTime;
    }

    public String getEditBy() {
        return editBy;
    }

    public void setEditBy(String editBy) {
        this.editBy = editBy;
    }

    public Activity(String id, String owner, String name, String startDate, String endDate, String cost, String description, String createTime, String createBy, String editTime, String editBy) {
        this.id = id;
        this.owner = owner;
        this.name = name;
        this.startDate = startDate;
        this.endDate = endDate;
        this.cost = cost;
        this.description = description;
        this.createTime = createTime;
        this.createBy = createBy;
        this.editTime = editTime;
        this.editBy = editBy;
    }

    public Activity() {
    }
}
